package com.miage.ldapsec.form;

public class UserCreate {
    String login, givenName, surname, password, passconfirm;

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    public String getGivenName() {
        return givenName;
    }

    public void setGivenName(String givenName) {
        this.givenName = givenName;
    }

    public String getSurname() {
        return surname;
    }

    public void setSurname(String surname) {
        this.surname = surname;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPassconfirm() {
        return passconfirm;
    }

    public void setPassconfirm(String passconfirm) {
        this.passconfirm = passconfirm;
    }
    
    public boolean isSamePassword(){
        return password.equals(passconfirm);
    }
    
    public boolean isEmpty() {
        return login==null || givenName==null || surname==null || password==null || passconfirm==null;
    }
    
    public boolean isComplete() {
        return !login.isEmpty() && !givenName.isEmpty() && !surname.isEmpty() && !password.isEmpty() && !passconfirm.isEmpty();
    }
    
    public void clearPasswords(){
        password = passconfirm = "";
    }
    
    
    
}
